package com.hyg.lib_music.modle;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * @author: Administrator
 * @date: 2021/4/16
 */
public class RecommedMusicData {

    /**
     * code : 200
     * message : 获取音乐疗愈模块推荐音乐成功
     * data : [{"id":2412,"musicName":"难忘今宵","musician":"无","musicDuration":288,"region":0,"musicUrl":"https://app-music-library.oss-cn-beijing.aliyuncs.com/西医类/养生类/音乐养生/难忘今宵.mp3"},{"id":2353,"musicName":"此时此夜难为情","musician":"无","musicDuration":360,"region":0,"musicUrl":"https://app-music-library.oss-cn-beijing.aliyuncs.com/西医类/养生类/音乐养生/此时此夜难为情.mp3"},{"id":2376,"musicName":"红颜旧","musician":"无","musicDuration":220,"region":0,"musicUrl":"https://app-music-library.oss-cn-beijing.aliyuncs.com/西医类/养生类/音乐养生/红颜旧.mp3"},{"id":2407,"musicName":"茶韵","musician":"无","musicDuration":215,"region":0,"musicUrl":"https://app-music-library.oss-cn-beijing.aliyuncs.com/西医类/养生类/音乐养生/茶韵.mp3"},{"id":2344,"musicName":"无言的小径","musician":"无","musicDuration":349,"region":0,"musicUrl":"https://app-music-library.oss-cn-beijing.aliyuncs.com/西医类/养生类/音乐养生/无言的小径.mp3"},{"id":2354,"musicName":"秋思","musician":"无","musicDuration":199,"region":0,"musicUrl":"https://app-music-library.oss-cn-beijing.aliyuncs.com/西医类/养生类/音乐养生/秋思.mp3"},{"id":2342,"musicName":"叶落熙风湖","musician":"无","musicDuration":196,"region":0,"musicUrl":"https://app-music-library.oss-cn-beijing.aliyuncs.com/西医类/养生类/音乐养生/叶落熙风湖.mp3","musicDes":"此曲曲调低吟、节奏徐缓、情调悠然、风格幽静、安详。乐曲类型：镇静型。适合用于音乐养生、高血压、失眠、去痛等。"},{"id":2366,"musicName":"一滴泪","musician":"无","musicDuration":297,"region":0,"musicUrl":"https://app-music-library.oss-cn-beijing.aliyuncs.com/西医类/养生类/音乐养生/一滴泪.mp3"},{"id":2356,"musicName":"水墨琴音","musician":"无","musicDuration":339,"region":0,"musicUrl":"https://app-music-library.oss-cn-beijing.aliyuncs.com/西医类/养生类/音乐养生/水墨琴音.mp3"},{"id":2381,"musicName":"华胥引","musician":"无","musicDuration":274,"region":0,"musicUrl":"https://app-music-library.oss-cn-beijing.aliyuncs.com/西医类/养生类/音乐养生/华胥引.mp3"}]
     */

    public int code;
    public String message;
    public List<DataDTO> data;

    public RecommedMusicData() {
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public List<DataDTO> getData() {
        return data;
    }

    public void setData(List<DataDTO> data) {
        this.data = data;
    }

    public static class DataDTO implements Parcelable {
        /**
         * id : 2412
         * musicName : 难忘今宵
         * musician : 无
         * musicDuration : 288
         * region : 0
         * musicUrl : https://app-music-library.oss-cn-beijing.aliyuncs.com/西医类/养生类/音乐养生/难忘今宵.mp3
         * musicDes : 此曲曲调低吟、节奏徐缓、情调悠然、风格幽静、安详。乐曲类型：镇静型。适合用于音乐养生、高血压、失眠、去痛等。
         */
        public int id;
        public String musicName;
        public String musician;
        public int musicDuration;
        public int region;
        public int favorite;
        public String musicUrl;
        public String musicDes;


        public DataDTO() {
        }

        protected DataDTO(Parcel in) {
            id = in.readInt();
            musicName = in.readString();
            musician = in.readString();
            musicDuration = in.readInt();
            region = in.readInt();
            favorite = in.readInt();
            musicUrl = in.readString();
            musicDes = in.readString();
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeInt(id);
            dest.writeString(musicName);
            dest.writeString(musician);
            dest.writeInt(musicDuration);
            dest.writeInt(region);
            dest.writeInt(favorite);
            dest.writeString(musicUrl);
            dest.writeString(musicDes);
        }

        @Override
        public int describeContents() {
            return 0;
        }

        public static final Creator<DataDTO> CREATOR = new Creator<DataDTO>() {
            @Override
            public DataDTO createFromParcel(Parcel in) {
                return new DataDTO(in);
            }

            @Override
            public DataDTO[] newArray(int size) {
                return new DataDTO[size];
            }
        };

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public String getMusicName() {
            return musicName;
        }

        public void setMusicName(String musicName) {
            this.musicName = musicName;
        }

        public String getMusician() {
            return musician;
        }

        public void setMusician(String musician) {
            this.musician = musician;
        }

        public int getMusicDuration() {
            return musicDuration;
        }

        public void setMusicDuration(int musicDuration) {
            this.musicDuration = musicDuration;
        }

        public int getRegion() {
            return region;
        }

        public void setRegion(int region) {
            this.region = region;
        }

        public String getMusicUrl() {
            return musicUrl;
        }

        public void setMusicUrl(String musicUrl) {
            this.musicUrl = musicUrl;
        }

        public String getMusicDes() {
            return musicDes;
        }

        public void setMusicDes(String musicDes) {
            this.musicDes = musicDes;
        }


        public int getFavorite() {
            return favorite;
        }

        public void setFavorite(int favorite) {
            this.favorite = favorite;
        }
    }
}
